<ion-view view-title="手动领取包裹">
    <ion-nav-buttons side="right">
        <button class="button button-clear button-positive" ng-click="barscanReceive()">扫码</button>
    </ion-nav-buttons>
    <ion-content>
        <ion-refresher on-refresh="getOrdersArray(orderid)"
                       pulling-text="下拉刷新..."
                       refreshing-text="拼命加载中..."
                       refreshing-icon="ion-loading-b">
        </ion-refresher>
        <div>
            <div class="item button-bar" >
                <input class="" style="width: 70%;" ng-model="orderid" placeholder="输入包裹上至少5位连续订单号">
                <a class="button" ng-click="getOrdersArray(orderid)">搜索</a>
            </div>
        </div>
        <div class="item" >
            <h2 class="assertive" style="white-space: normal">请确认已领取到包裹，再执行此领取包裹操作！！！</h2>
            <h2 class="assertive" style="white-space: normal">请确认已领取到包裹，再执行此领取包裹操作！！！</h2>
        </div>
        <div class="list card" ng-repeat="order in ordersArray" href="#">
            <div class="item">
                <h2>{{order.get('areaId') | area}}区-{{order.get('orderid')}}</h2>
            </div>
            <div class="item item-body">
                <p ng-if="(order.get('type') === 9)">
                    商家名称：{{order.get('sellerName')}}--{{order.get('storeName')}}
                </p>
                <p>
                    订单状态：{{order.get('status') | orderState}}
                </p>
                <p>
                    派送地址：{{order.get('address').address}}
                </p>
                <p>
                    收件人：{{order.get('address').name}} <a href="tel:{{order.get('address').phone}}">{{order.get('address').phone}}</a>
                </p>
                <p>
                    支付方式：{{order.get('payway')}}
                </p>
                <p>
                    订单备注：{{order.get('remark')}}
                </p>
                <p>
                    下单时间：{{order.createdAt | date:'yyyy-MM-dd HH:mm'}}
                </p>
                <p>
                    审核时间：{{(order.get('approvaldate') ||o.get('paytime')) | deltaDate}} 分钟前
                </p>
                <button ng-if="(order.get('status') !== 7000)" ng-disabled="order.get('status') === 7000" class="button button-block button-calm" ng-click="getPackage(event,order,$index)">确认已领取包裹</button>
                <button ng-if="(order.get('status') === 7000)" class="button button-block button-balanced" >已领取</button>
            </div>
        </div>
        <div ng-if="(ordersArray.length === 0)" class="card">
            <div class="item item-text-wrap">
                啥都没有~
            </div>
        </div>
        <!--<ion-infinite-scroll ng-if="hasMore" on-infinite="loadMore()" distance="1%" ></ion-infinite-scroll>-->
    </ion-content>
</ion-view>
